<template>
    <div class="section-wrap">
        <div class="form-section">
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>项目名称</label>
                </div>
                <div>
                    <p>{{detailObj.ProjectName}}</p>
                </div>
            </div>
            <div v-if="detailObj.CreateDepartSir != 1">
                <div class="form-item  form-item-style1">
                    <div class="label-title">
                        <label>项目经理</label>
                    </div>
                    <div>
                        <p>{{detailObj.ProjectManager}}</p>
                    </div>
                </div>
                <div class="form-item  form-item-style1">
                    <div class="label-title">
                        <label>安全总监</label>
                    </div>
                    <div>
                        <p>{{detailObj.SafeManager}}</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-section">
            <div class="form-item  form-item-style1 paddingR12">
                <div class="label-title">
                    <label>带班领导</label>
                </div>
                <p style="display:flex;align-items: center;">
                    <span style="color:#999;font-size:14px;">{{detailObj.Leader}}</span>
                </p>
            </div>
            <div class="form-item  form-item-style1">
                <div class="label-title">
                    <label>所属单位</label>
                </div>
                <div>
                    <p>{{detailObj.LeaderDeptName}}</p>
                </div>
            </div>
            <div class="form-item  form-item-style1">
                <div class="label-title">
                    <label>职务</label>
                </div>
                <div>
                    <p>{{detailObj.LeaderCategory}}</p>
                </div>
            </div>
        </div>
        <div class="form-section">
            <div class="form-item  form-item-style1">
                <div class="label-title">
                    <label>带班时间</label>
                </div>
                <div>
                    <p>{{detailObj.StartDate?detailObj.StartDate.split(' ')[0]:''}}</p>
                </div>
            </div>
            <div class="form-item form-item-style2">
                <div class="label-title space-between">
                    <div class="space-between">
                        <label>检查人员</label>
                    </div>
                </div>
                <div>
                    <p class="textarea">{{detailObj.CheckPerson}}</p>
                </div>
            </div>
            <div class="form-item form-item-style2">
                <div class="label-title">
                    <label>带班记事</label>
                </div>
                <div>
                    <p class="textarea">{{detailObj.BaseInformation}}</p>
                </div>
            </div>
            <div class="form-item form-item-style2">
                <div class="label-title space-between">
                    <div class="space-between">
                        <label>检查图片</label>
                    </div>
                    <span>当前共{{detailObj.Files?detailObj.Files.length:0}}张照片</span>
                </div>
                <div class="upload-wrap">
                    <upload v-if="detailObj.Files"
                            :imgList="detailObj.Files"></upload>
                </div>
            </div>
            <div class="form-item  form-item-style1">
                <div class="label-title">
                    <label>记录人</label>
                </div>
                <div>
                    <p>{{detailObj.CreateUser}}</p>
                </div>
            </div>
            <div class="form-item  form-item-style1">
                <div class="label-title">
                    <label>记录时间</label>
                </div>
                <div>
                    <p>{{detailObj.CreateDate}}</p>
                </div>
            </div>
        </div>
        <myMenu></myMenu>
    </div>
</template>
<script>
import myMenu from '@/commonComponents/menu'
import upload from '@/commonComponents/upload/index'
export default {
    name: 'leadershipWorkDetail',
    components: {
        upload,
        myMenu
    },
    data () {
        return {
            userInfo: '',
            detailObj: {}
        }
    },
    created () {
        this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
        this.getDetail()
    },
    methods: {
        getDetail () {
            let params = {
                'business': 'GetWorkRecord',
                'data': {
                    ID: this.$route.query.id,
                    BusinessType: '2'
                },
                'userId': this.userInfo.userid
            }

            this.$axiosAjax.getConfigJson(params)
                .then((res) => {
                    if (res.data.code === 0) {
                        this.detailObj = res.data.data
                    }
                }).catch((response) => {
                })
        }
    }
}
</script>
<style scoped>
</style>
